namespace FineCollection.Intf
{
    /// <summary>
    /// A list (write enabled).
    /// </summary>
    /// <typeparam name="T">type of an item.</typeparam>
    public interface WQueue<T> : RList<T>, WCollection<T>
    {
        /// <summary>
        /// Enqueues the item (adds the item to the tail of the queue).
        /// </summary>
        /// <param name="item">item to enqueue.</param>
        void Enqueue(T item);


        /// <summary>
        /// Dequeues an item (excludes the item from the head of the queue 
        /// and returns the excluded item).
        /// </summary>
        /// <returns>dequeued item.</returns>
        /// <exception cref="CollectionIsEmpty">if the queue is empty.</exception>
        T Dequeue();
    }
}